import request from '@/utils/request'

// 查询app固件版本管理列表
export function listFirmwareVersion(query) {
  return request({
    url: '/app/firmware/version/list',
    method: 'get',
    params: query
  })
}

// 查询app固件版本管理详细
export function getFirmwareVersion(versionId) {
  return request({
    url: '/app/firmware/version/' + versionId,
    method: 'get'
  })
}

// 新增app固件版本管理
export function addFirmwareVersion(data) {
  return request({
    url: '/app/firmware/version',
    method: 'post',
    data: data
  })
}

// 修改app固件版本管理
export function updateFirmwareVersion(data) {
  return request({
    url: '/app/firmware/version',
    method: 'put',
    data: data
  })
}

// 删除app固件版本管理
export function delFirmwareVersion(versionId) {
  return request({
    url: '/app/firmware/version/' + versionId,
    method: 'delete'
  })
}

export function changeForce(data) {
  return request({
    url: '/app/firmware/version/changeForce',
    method: 'put',
    data: data
  })
}

export function changeEnable(data) {
  return request({
    url: '/app/firmware/version/changeEnable',
    method: 'put',
    data: data
  })
}
